/*
 * Copyright (C) 2017-2019 Dremio Corporation
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
@import "~@app/uiTheme/less/color-schema.less";

@_border: 1px solid @TABLE_BORDER;

.cell-background() {
  background: @table-bg;
}

.cell-reset() {
  .cell-background();
  border: none;
}

.table-viewer-container {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.table-viewer {
  outline: none;

  &:global(.public_fixedDataTable_main) {
    border: none;
  }
  :global {

    //do it for body cell only. Header cell have correct width
    .public_fixedDataTable_bodyRow .fixedDataTableCellLayout_wrap1 { // force top level cell wrapper to have 100% width. This important
      width: 100%;
    }

    .public_fixedDataTableCell_main {
      .cell-reset();
    }

    .public_fixedDataTable_header,
    .public_fixedDataTable_header .public_fixedDataTableCell_main {
      .cell-reset();
      border-bottom: @_border;
    }
    .public_fixedDataTable_hasBottomBorder {
      border-bottom: none;
    }

    .public_fixedDataTableRow_highlighted,
    .public_fixedDataTableRow_highlighted .public_fixedDataTableCell_main {
      .cell-background();
    }

    .public_fixedDataTableRow_main.public_fixedDataTableRow_even {
      background: @table-bg-accent;
    } 

    .public_fixedDataTable_header{
      background: white;
    }
  }
}
